@extends('admin.container')

@section('c-head')
    <script type="text/javascript">
        var PAGE_DATA = {
            REST_API : {
                get_order_list_url : "{{route('admin.trade.order.index')}}", // 获取订单列表数据,搜索
            },
            filter_data : [
                {code:'1', text: '订单号'},
                {code:'2', text: '供应商'},
                {code:'3', text: '采购商'}
            ],
            payment_term : [
                {code:'0', text: '支付宝'},
                {code:'1', text: '中国银行'},
                {code:'2', text: '建设银行'}
            ],
            order_state : [
                {code:'1', text: '待物流报价'},
                {code:'2', text: '待付款'},
                {code:'3', text: '待发货'},
                {code:'4', text: '已发货'},
                {code:'5', text: '已收货'},
                {code:'6', text: '资金结算完毕'},
            ]
         };
    </script>
@stop
@section('c-body')
    <div class="comm-title">
        <span class="title-msg">交易 > 订单 > 列表</span>
    </div>
    <div class="comm-body">
        <div class="tab-body current1">
            <div class="supplyList-screen mt20">
                <div class="supplyList-screen-main">
                    <div class="sl-screen-box">
                        <div>
                            <select id="filter-condition" style="width: 75px;height: 30px;">

                            </select>
                            <input id="filter-value" type="text" style="width: 200px;height: 30px;">
                            <span class="lh30 c-gray">下单日期：</span>
                            <input id="start-time" type="text" readonly="readonly" class="time">
                            -
                            <input id="end-time" type="text" readonly="readonly" class="time">
                            <span class="ml5 lh30 c-gray">支付方式：</span>
                            <select id='payment' class="district">

                            </select>
                            <span class="ml5 lh30 c-gray">订单状态:</span>
                            <select id="order-state" class="district">
                            </select>
                            <button id="search-btn" type="button" class="am-btn am-btn-success am-btn-xs ml10" >搜索</button>
                        </div>
                    </div>
                </div>
            </div>
            <!-- 表单列表 -->

            <table class="am-table am-table-striped am-table-hover am-table-centered brand-manage-tbl admin-comm-tbl mt20" >
                <thead>
                <tr>
                    <th>订单号</th>
                    <th>供应商</th>
                    <th>采购商</th>
                    <th>下单时间</th>
                    <th>商品总额</th>
                    <th>运费</th>
                    <th class="wb15">订单总额（含运费）</th>
                    <th>支付方式</th>
                    <th style="width: 7%">订单状态</th>
                    <th style="width:10%">操作</th>
                </tr>
                </thead>
                <tbody class="" id="orderlist-context">


                </tbody>
            </table>

            <div id="comm-paging" class="admin-paging"></div>
        </div>

    </div>
    <script type="text/template" id="tbl-list-templ">
        <% _.each(obj, function(item){ %>
        <tr>
            <td style="max-width:120px;" title="<%=item.order_code %>">
                <%=item.order_code %>
            </td>
            <td style="max-width: 120px" title="<%=item.provider_name %>">
                <%=item.provider_name %>
            </td>
            <td style="max-width: 100px;" title="<%=item.purchaser_name %>">
                <%=item.purchaser_name %>
            </td>
            <td>
                    <span class="txt-line-2" style="width: 100px; max-width: 100px;">
                <%=item.pay_time %>
                    </span>
            </td>
            <td style="max-width: 100px;" title="￥<%=item.goods_total %>">
                ￥
                <%=item.goods_total %>
            </td>
            <td style="max-width: 100px;">
                ￥
                <%=item.logistics_price %>
            </td>
            <td style="max-width: 160px;min-width: 160px;" title="￥<%=item.order_total %>">
                ￥
                <%=item.order_total %>
            </td>
            <td style="max-width: 80px;">
                <%=item.pay_type %>
            </td>
            <td style="max-width: 100px;" title="<%=item.status %>">
                <%=item.status %>
            </td>
            <td style="width:10%">
                <div class="operate-btns-2 clearfix" style="width: 50px;">
                    <a id="" type="button" class="edit-brand-btn am-btn am-btn-primary am-btn-xs" href="<%=item.detail_url %>" style="float:left;">
                        查看
                    </a>
                </div>
            </td>
        </tr>
        <% }); %>
    </script>

    <script src="/assets/b2b/admin/js/pages/17.js"> </script>

@stop